home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
011
/
brutil.arc
/
WHEREIS.DOC
< prev
Wrap
Text File
|
1988-02-19
|
6KB
|
186 lines
documentation for wHEREIS command
Purpose: Searches for specified file(s) through all DOS
2.0 directories listing matching files with their
appropriate directories and sub-directories.
Syntax: WHEREIS [drive:][filename[.ext]][/options]
WHEREIS [drive:][mm-dd-[cc]yy][.[mm-dd-[cc]yy]]/L|/E|/G[/options]
Type: External
Remarks: This command is from the January 1984 issue of
"Softalk for the IBM Personal Computer" by John
Socha. It will work correctly on any drive.
Options:
/nn -- nn=1-255 set for paging every 1-255 lines
nn=0 set for no paging of output
/A -- finds files with the archive attribute bit set
/D -- finds only directories
/E -- equal -- finds files created on a specified date.
/F -- full -- include drive name with output file names
/G -- greater -- finds files created after a specified date.
/H -- finds files with the hidden attribute bit set
/L -- less -- finds files created before a specified date.
/N -- finds only "normal" files without directory or volume labell bits set
/R -- finds files with the read-only attribute bit set
/S -- finds files with the system attribute bit set
/V -- finds files with the volume attribute bit set
/X -- finds only "exact" files with the exact set of attributes specified
If no file name is supplied with all but /E /G and /L, a filename of *.* is
used. If no date is supplied with /E /G or /L, the current date is used.
With /E /G or /L, an alternate syntax is required. It is shown on the second
line of the format as shown above.
Where:
mm -- Month (1-12)
dd -- Day (1-31)
cc -- optional century (19 or 20)
yy -- year (00-99 if cc=20, otherwise, 80-99)
Any two of these options may be entered in any order and may also be specified
along with any other options described above. In this way you can locate files
created on or after a specified date or to locate all files not created on a
specified date. Note that using all three options together would be the
equivalent of selecting all files. That would be like using a machine gun to
kill mosquitos. It works but there is a much less dramatic way to do it.
Just type: WHEREIS
If you include a period in the date specification, you may enter a second
date. With the /E option, files matching this date will be included as well.
With /L or /G, the opposite condition is applied to the second date.
If nothing is entered for the second date, the current date is used.
The /nn option stops the program every nn lines and waits for a response from
the keyboard. Pressing CTRL-C ends the program.
Pressing the letter S or s lets you temporarily leave the program to do some
other operations. You are prompted to enter a command. If you do, that
command will be executed and WHEREIS will regain control and proceed to the
next file or group of files to be listed. If you do not enter a command,
the program will go to COMMAND.COM and you will then be able to enter any
commands you wish. When you finish, type EXIT and WHEREIS will regain
control and continue.
When you are asked to enter a command, WHEREIS makes available the fully
specified path and file name of the last file displayed. This allows you to
use DOS's standard line editing facilities to include the file name. The
most common application would be to: Press Insert, type a command followed
by a blank, Press F3 to bring down the filename, then press enter. Here is an
example.
WHEREIS WHEREIS/1
\BATCH\WHEREIS.COM
Enter command for shell operation.
*FILES C:\BATCH\WHEREIS.COM/F/P
WHEREIS.COM 1988-02-19 11:59:00 2K 1732 Arc
\MASM\SOURCE\WHEREIS.ASM
Enter command for shell operation.
*FILES C:\MASM\SOURCE\WHEREIS.ASM/F/P
WHEREIS.ASM 1988-02-19 11:58:42 18K 18176 Arc
\MASM\SOURCE\WHEREIS.DOC
Enter command for shell operation.
*FILES C:\MASM\SOURCE\WHEREIS.DOC/F/P
WHEREIS.DOC 1988-02-17 09:52:30 6K 5120
\TB\WHEREIS.BAS
Enter command for shell operation.
*FILES C:\TB\WHEREIS.BAS/F/P
WHEREIS.BAS 1987-11-04 01:10:00 8K 7594
\TB\WHEREIS.INC
Enter command for shell operation.
*FILES C:\TB\WHEREIS.INC/F/P
WHEREIS.INC 1987-11-04 01:10:00 22K 21761
In the above example, I added another wrinkle! I typed /F/P after pressing
F3.
This release includes other fairly minor changes from the previous version.
If no extension is included in the command line filespec,WHEREIS now acts the
same as the DOS DIR command, that is:
WHEREIS file {CR}
performs the same search as:
WHEREIS file.* {CR}
WHEREIS can still look for files with only null extensions by using:
WHEREIS file. {CR}
If you do not enter anything before the period, an asterisk is inserted.
In other words:
WHEREIS . {CR}
is equivalent to:
WHEREIS *. {CR}
NOTE: This is an equivalent of the Norton Utilities "File Find",
except that Norton prints full directory information, and this just
prints the path.
WHEREIS has the capability of setting the DOS ERRORLEVEL flag to 1 or 0.
1 means that no matching filenames were found.
Examples:
The following examples demonstrate
proper usage (where {CR} indicates a carriage
return:
WHEREIS myfile.txt {CR}
WHEREIS myfile.* {CR}
WHEREIS myfile {CR}
WHEREIS myfile. {CR}
WHEREIS *.bas {CR}
WHEREIS .bas {CR}
WHEREIS *.* {CR}
WHEREIS * {CR}
WHEREIS {CR}
WHEREIS *. {CR}
WHEREIS . {CR}
WHEREIS A:* {CR}
WHEREIS A: {CR}
WHEREIS 8-24-87/E {CR}
WHEREIS 8-24-87/G {CR}
WHEREIS 8-25-87./E/G {CR}
WHEREIS 8-1-87/E/G/D {CR}
WHEREIS 8-1-87./E/G/D {CR}
WHEREIS 8-24-87/L/H {CR}
In my opinion, not enough can be said about the virtues of including the
source code with your executable programs. Without it, I would have had to
re-invent the wheel in order to get the results I have obtained by adding
code to this program to support the new features described here. WHEREIS.ASM
contains the source code for this program. Enjoy!
to this program to support the new features described here.